#pragma once

#include<string>

using namespace std;

/*
User表的数据类，记录表中实例的每个参数值
*/

class User{
public:
    User(string name="", string password="", string state = "offline", int id = -1):
        _name(name), _password(password), _state(state), _id(id)
    {}

    void setId(const int id){_id = id;};
    void setName(const string &name){_name = name;};
    void setPassword(const string &password){_password = password;};
    void setState(const string &state){_state = state;};

    int getId(){return _id;};
    string getName(){return _name;};
    string getPassword(){return _password;};
    string getState(){return _state;};

protected:
    int _id;
    string _name;
    string _password;
    string _state;
};